//
//  ILGPay.h
//  ILGDemo
//
//  Created by HappyWork on 2019/2/14.
//  Copyright © 2019 Happy. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@protocol ILGPayDelegate <NSObject>

// 扣款成功的回调
- (void)chargeComplete:(NSDictionary *)result error:(NSError *)error;

@end


@interface ILGPay : NSObject

@property (nonatomic, weak) id<ILGPayDelegate>delegate;

- (void)iap_pay:(NSString *)productId orderId:(NSString *)orderId;

// 添加内购支付的回调观察者
- (void)iap_addTransactionObserverForInAppPurchase;

/**
 配置内购商品ID数组, 默认为bundleId+".diamond1~6"
 
 @param array 内购商品ID数组
 */
- (void)iap_configureProductIdentifierArr:(NSArray *)array;

- (void)iap_finishTransaction:(NSString *)orderId;

@end

NS_ASSUME_NONNULL_END
